﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pgPartSocial.aspx.cs" Inherits="EGuayas.Web.Licenciamiento.admin.tabs.pgPartSocial" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link  href="~/Resources/css/Style.css"  rel="stylesheet" />
    <!-- Load Ext JS --> 
    <script src="../../../Resources/js/Global.js"></script>
    
</head>
<body>   
     <form id="Form1" runat="server"> 
   <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
    <Items>
        <ext:FormPanel ID="FormPanel1" runat="server" Region="Center" Layout="VBoxLayout" >
                    <LayoutConfig>
                            <ext:VBoxLayoutConfig Align="Stretch" />
                    </LayoutConfig>
                    <TopBar>
                            <ext:Toolbar ID="Toolbar1" runat="server">
                                <Items>
                                      <ext:UserControlLoader ID="UserControlLoader1" runat="server" Path="~/Licenciamiento/ucInfoProyecto.ascx"  /> 
                                    <ext:ToolbarFill />
                                    <ext:Button ID="ShowTab1" runat="server" Text="Mostrar Documentos"  Disabled="true" Icon="PageWhiteStack">
                                        <Listeners>
                                            <Click Handler="#{TabPanel1}.addTab(#{Tab1},0);this.setDisabled(true);" />
                                        </Listeners>
                                    </ext:Button>                           
                                    <%--<ext:Button ID="ShowTab2" runat="server" Text="Mostrar Tareas" Disabled="true" Icon="Wrench">
                                        <Listeners>
                                            <Click Handler="#{TabPanel1}.addTab(#{Tab2},1);this.setDisabled(true);" />
                                        </Listeners>
                                    </ext:Button>                        --%>
                                    <ext:Button ID="ShowTab3" runat="server" Text="Mostrar Tareas"    Icon="Report"  >
                                        <Listeners>
                                            <Click Handler="#{TabPanel1}.addTab(#{Tab3},2);this.setDisabled(true);" />
                                        </Listeners>
                                    </ext:Button>
                                     <ext:Button ID="ShowTab4" runat="server" Text="Mostrar Informe"    Icon="Report"  >
                                        <Listeners>
                                            <Click Handler="#{TabPanel1}.addTab(#{Tab4},3);this.setDisabled(true);" />
                                        </Listeners>
                                    </ext:Button>
                                     <ext:Button ID="ShowTab5" runat="server" Text="Mostrar Actividades" Icon="PageWhiteText">
	                                <Listeners>
		                                <Click Handler="#{TabPanel1}.addTab(#{Tab5},4);this.setDisabled(true);" />
	                                </Listeners>
                                </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                    <Items>
                         <ext:TabPanel ID="TabPanel1" runat="server" Flex="1"  TabPosition="Left">
                         <Items>
                                <ext:Panel ID="Tab1" Title="Documentos" runat="server" Closable="true" CloseAction="Hide"  Icon="PageWhiteStack"  Layout="Fit">
                                    <Items>
                                        <ext:UserControlLoader ID="uc_documentos_ps" UserControlID="wuc_corregdoc_ps"  runat="server" Path="~/Licenciamiento/admin/tabs/wucCorreguirDoc.ascx" OnComponentAdded="OnCorreguirDocPSAdded" />    
                                    </Items>
                                    <Listeners>
                                        <Close Handler="#{ShowTab1}.setDisabled(false);" />
                                    </Listeners>
                                </ext:Panel>
                                <%--<ext:Panel ID="Tab2" Title="Información" runat="server" Closable="true" CloseAction="Hide"  Icon="Wrench" Layout="Fit">
                                    <Items>
                                        
                                    </Items>
                                    <Listeners>
                                        <Close Handler="#{ShowTab2}.setDisabled(false);" />
                                    </Listeners>
                                </ext:Panel>--%>
                                <ext:Panel ID="Tab3" Title="Tarea" runat="server" Closable="true" CloseAction="Hide"  Icon="Wrench" Layout="Fit">
                                    <Items>
                                         <%--::Tareas--%>                    
                                         <ext:UserControlLoader ID="uc_tareas_L005"  UserControlID="wuc_partsocial_borrador_l005"  runat="server" Path="~/Licenciamiento/admin/tabs/wucTareas.ascx" OnComponentAdded="OnTareasPartSocialAdded" />                        
                                     </Items>
                                    <Listeners>
                                        <Close Handler="#{ShowTab3}.setDisabled(false);" />
                                    </Listeners>
                                </ext:Panel>
                                <ext:Panel ID="Tab4" Title="Informe" runat="server" Closable="true" CloseAction="Hide"  Icon="Report" Layout="Fit">
                                    <Items>
                                        <%--::Informe--%>
                                       <ext:UserControlLoader ID="uc_correginfodoc_lps001" UserControlID="wuc_correginfodoc_ps_l01" runat="server" Path="~/Licenciamiento/admin/tabs/wucInformeCorrecion.ascx" OnComponentAdded="OnInformeCorrecionPSAdded" />
                                    </Items>
                                    <Listeners>
                                        <Close Handler="#{ShowTab4}.setDisabled(false);" />
                                    </Listeners>
                                </ext:Panel>
                                 <ext:Panel ID="Tab5" Title="Actividades" runat="server" Closable="true" CloseAction="Hide" Icon="PageWhiteText" Layout="Fit">
	                                <Items>
		                                <%--:: --%>
		                                <ext:UserControlLoader ID="uc_act_c001" UserControlID="uc_act_c001_ps" runat="server" Path="~/Licenciamiento/admin/tabs/wucPartSoc.ascx" OnComponentAdded="OnActividadesAdded" />
	                                </Items>
	                                <Listeners>
		                                <Close Handler="#{ShowTab5}.setDisabled(false);" />
	                                </Listeners>
	                            </ext:Panel>           
                         </Items>
                        <Bin></Bin>                      
                        
                </ext:TabPanel>   
                </Items>
                <%--<BottomBar>
                     <ext:StatusBar 
                            ID="StatusBar2" 
                            runat="server"
                            StatusAlign="Left">
                            <Items>
                                
                                <ext:ToolbarTextItem ID="ToolbarTextItem1" runat="server" Text="Paso 6/9" Cls="ux-bold-text-item"  Margin="15"/>
                            </Items>
                        </ext:StatusBar>
                    </BottomBar>--%>
       </ext:FormPanel>
       
    </Items>
   </ext:Viewport>
     </form>    
          <ext:XScript ID="XScript1" runat="server">
    <script  type="text/javascript">
        var pgFn = new Object();
        pgFn.presentaMensaje = true;
        //::Tareas
        pgFn.changeSiNO = function (value) {
            return Ext.String.format('<span>{0}</span>', (value == "S") ? "Si" : "No");
        };
        pgFn.setValueDirect = function (meDropDownField, meRdGroup, record) {
            meDropDownField.setValue(record.data.TecnicoId, record.data.Tecnico, true);
            meRdGroup.setValue({
                rdg_resp_group: record.get('Responsable')
            });
        };
        pgFn.setTecnico = function (me, record) {
            me.grid.dropDownField.setValue(record.data.Id, record.data.Nombre + ' ' + record.data.Apellido, true);
        };
        //Prorroga
        pgFn.setFecha = function (record) {
            var v = record.get("FechaFin");
            var field = Ext.getCmp("dfProrrogaInicial");
            field.setMinValue(v);

        };
        pgFn.PrepareProrroga = function (grid, command, record, row) {
            if (command.command == 'CmdProrroga') {
                command.hidden = true;
                command.hideMode = 'display';

                if (record.get("Prorroga") == false) {

                    command.hidden = false;
                    command.hideMode = 'visibility';
                }


            }

        };

 </script>
         
</ext:XScript> 

    
</body>


</html>
 


